<template>
    <page-body>
        <view class="page">
            <view class="flex benben-position-layout flex flex-wrap align-center my_flex_0_higd" :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
                <view class='flex flex-wrap align-center justify-between flex-sub my_fd0_0_higd'>
                    <view class='flex flex-wrap align-center my_fd0_0_c0_higd' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
                        <!-- <text class='fu-iconfont2  my_fd0_0_c0_c0_higd'    >&#xE794;</text>
 -->
                    </view>
                    <view class='flex flex-wrap align-stretch justify-center'>
                        <text class='my_fd0_0_c1_c0_higd'>{{$t('我的')}}</text>
                    </view>
                    <view class='flex flex-wrap align-center justify-end my_fd0_0_c0_higd' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/tabBar/myNews/myNews`">
                        <!-- <benben-message-num class='my_fd0_0_c2_c0_higd' size='24' color='#fff' background-color='var(--benbenFontColor5)' style-type='default'>
                        </benben-message-num>
                        <image class='my_fd0_0_c2_c1_higd' mode="aspectFit" :src='STATIC_URL+"86.png"'></image> -->
                    </view>
                </view>

            </view>
            <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>

            <view class="flex benben-flex-layout flex-wrap align-center">
                <view class='flex flex-direction flex-wrap align-stretch flex-sub my_fd1_0_higd'>
                    <view class='flex flex-direction flex-wrap align-stretch justify-between my_fd1_0_c0_higd'>
                        <view class='flex align-center justify-end my_fd1_0_c0_c0_higd' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/grzx/personalData/personalData`" v-if="isLogin===true">
                            <image class='my_fd1_0_c0_c0_c0_higd' mode="aspectFill" :src='userInfo.avatar'></image>
                            <view class='flex flex-direction flex-wrap align-start flex-sub'>
                                <text class='flex-sub my_fd1_0_c0_c0_c1_c0_higd'>{{group==1?userInfo.real_name:userInfo.nickname}}</text>
                                <!-- <text class='my_fd1_0_c0_c0_c1_c1_higd'  >{{userInfo.email}}</text>
 -->
                            </view>
                            <text class='my_fd1_0_c0_c0_c2_higd'>{{$t('我的资料')}}</text>
                            <image class='my_fd1_0_c0_c0_c3_higd' mode="aspectFit" :src='STATIC_URL+"92.png"'></image>
                        </view>
                        <view class='flex flex-wrap align-center' @tap.stop="toLoginDiy()" v-if="isLogin===false">
                            <image class='my_fd1_0_c0_c0_c0_higd' mode="aspectFit" :src='STATIC_URL+"2.png"'></image>
                            <view class='flex flex-direction flex-wrap align-center'>
                                <text class='flex-sub my_fd1_0_c0_c1_c1_c0_higd'>{{$t('请登录')}}</text>
                            </view>
                        </view>
                    </view>
                </view>
            </view>


            <!---flex布局3flex布局开始-->
            <!-- <view class="flex flex-direction align-stretch benben-flex-layout my_flex_2_higd" v-if='group == 1'>
                <view class='flex flex-wrap align-center'>
                    <text class='my_fd2_0_c0_higd'>{{$t('学习档案')}}</text>
                </view>
                <view class='flex flex-wrap align-center justify-around my_fd2_1_higd'>
                    <view class='flex flex-direction flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pageschool/school/xxjl/xxjl`">
                        <image class='my_fd2_1_c0_c0_higd' mode="aspectFit" :src='STATIC_URL+"170.png"'></image>
                        <text class='my_fd2_1_c0_c1_higd'>{{$t('学习记录')}}</text>
                    </view>
                    <view class='flex flex-direction flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pageschool/school/ksjl/ksjl`">
                        <image class='my_fd2_1_c0_c0_higd' mode="aspectFit" :src='STATIC_URL+"171.png"'></image>
                        <text class='my_fd2_1_c0_c1_higd'>{{$t('考试记录')}}</text>
                    </view>
                </view>
            </view> -->
			<view class="yltop flex">
				  <image class='yl' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/grzx/anquanyl/anquanyl`" mode="aspectFit" :src='STATIC_URL+"248.png"'></image>
			</view>

            <!---flex布局3flex布局结束-->
            <!---flex布局flex布局开始-->
            <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout my_flex_3_higd">
                <view class='flex flex-wrap align-stretch justify-between flex-sub my_fd3_0_higd' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/xtsz/cardAndSafe/cardAndSafe`">
                    <view class='flex flex-wrap align-center'>
                        <image class='my_fd3_0_c0_c0_higd' mode="aspectFit" :src='STATIC_URL+"81.png"'></image>
                    </view>
                    <view class='flex flex-wrap align-center justify-between flex-sub my_fd3_0_c1_higd'>
                        <text class='my_fd3_0_c1_c0_higd'>{{$t('账户与安全')}}</text>
                        <image class='my_fd3_0_c1_c1_higd' mode="aspectFit" :src='STATIC_URL+"11.png"'></image>
                    </view>
                </view>
                <view class='flex flex-wrap align-stretch justify-between flex-sub my_fd3_1_higd' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/dlzc/privacyPolicy/privacyPolicy`">
                    <view class='flex flex-wrap align-center'>
                        <image class='my_fd3_0_c0_c0_higd' mode="aspectFit" :src='STATIC_URL+"82.png"'></image>
                    </view>
                    <view class='flex flex-wrap align-center justify-between flex-sub my_fd3_0_c1_higd' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/dlzc/xieyi/xieyi`">
                        <text class='my_fd3_0_c1_c0_higd'>{{$t('用户协议')}}</text>
                        <image class='my_fd3_0_c1_c1_higd' mode="aspectFit" :src='STATIC_URL+"11.png"'></image>
                    </view>
                </view>
                <view class='flex flex-wrap align-stretch justify-between flex-sub my_fd3_1_higd' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/dlzc/privacyPolicy/privacyPolicy`">
                    <view class='flex flex-wrap align-center'>
                        <image class='my_fd3_0_c0_c0_higd' mode="aspectFit" :src='STATIC_URL+"83.png"'></image>
                    </view>
                    <view class='flex flex-wrap align-center justify-between flex-sub my_fd3_0_c1_higd'>
                        <text class='my_fd3_0_c1_c0_higd'>{{$t('隐私政策')}}</text>
                        <image class='my_fd3_0_c1_c1_higd' mode="aspectFit" :src='STATIC_URL+"11.png"'></image>
                    </view>
                </view>
                <view class='flex flex-wrap align-stretch justify-between flex-sub my_fd3_1_higd' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/xtsz/feedBack/feedBack`">
                    <view class='flex flex-wrap align-center'>
                        <image class='my_fd3_0_c0_c0_higd' mode="aspectFit" :src='STATIC_URL+"84.png"'></image>
                    </view>
                    <view class='flex flex-wrap align-center justify-between flex-sub my_fd3_0_c1_higd'>
                        <text class='my_fd3_0_c1_c0_higd'>{{$t('意见反馈')}}</text>
                        <image class='my_fd3_0_c1_c1_higd' mode="aspectFit" :src='STATIC_URL+"11.png"'></image>
                    </view>
                </view>
                <view class='flex flex-wrap align-stretch justify-between flex-sub my_fd3_4_higd' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/xtsz/aboutUs/aboutUs`">
                    <view class='flex flex-wrap align-center'>
                        <image class='my_fd3_0_c0_c0_higd' mode="aspectFit" :src='STATIC_URL+"85.png"'></image>
                    </view>
                    <view class='flex flex-wrap align-center justify-between flex-sub my_fd3_0_c1_higd'>
                        <text class='my_fd3_0_c1_c0_higd'>{{$t('关于我们')}}</text>
                        <image class='my_fd3_0_c1_c1_higd' mode="aspectFit" :src='STATIC_URL+"11.png"'></image>
                    </view>
                </view>
            </view>

            <!---flex布局flex布局结束-->
            <view class="flex flex-wrap align-center justify-center benben-position-layout flex my_flex_4_higd">
                <button class='my_fd4_0_higd' @tap.stop="popupShow1656992350800=true">{{$t('退出登录')}}</button>

            </view>
            <view :style="{height: '88rpx'}"></view>
			<benben-popup v-model="popupShow1656992350800" :mask="true" :mask-close-able="true" mode='center'>
				<!---退出登录flex布局开始-->
				<view class="flex flex-direction flex-wrap align-center system_flex_2_ben"
					@tap.stop="popupShow1650940432200=true">
					<text class='system_fd2_0_ben'>{{$t('提示')}}</text>
					<text class='system_fd2_1_ben'>{{$t('确定退出当前账号？')}}</text>
					<view class='flex align-center system_fd2_2_ben'>
						<button class='system_fd2_2_c0_ben' @tap.stop="popupShow1656992350800=false"
							>{{$t('取消')}}</button>
						<button class='system_fd2_2_c1_ben' @tap.stop="outFunc()"
							>{{$t('确定')}}</button>
					</view>
				</view>
			
				<!---退出登录flex布局结束-->
			
			</benben-popup>

        </view>
    </page-body>
</template>
<script>
    import {
        validate
    } from '@/common/utils/validate.js'
	import { host } from '@/common/config.js'

    export default {
        components: {},


        data() {
            return {
				"popupShow1656992350800": false,
                /** userInfo【用户信息】
                 *   is_close【是否开启签到】
                 *   follow_count【关注的店铺数量】
                 *   is_pay_password【是否设置支付密码 1 已设置 0 未设置】
                 *   certified【实名认证状态 -1 未进行认证 1 待审核 2 审核通过 3 已拒绝】
                 *   total_money【会员总金额】
                 *   browse_count【足迹数量】
                 *   collection_count【收藏数量】
                 *   _mobile【手机号不带*号】
                 *   score【积分余额】
                 *   total_consumption_money【总消费金额】
                 *   freeze_money【会员冻结金额】
                 *   user_money【会员余额】
                 *   gender【性别 1 男 2 女】
                 *   birthday【生日】
                 *   email【邮箱】
                 *   account【登录账号】
                 *   avatar【头像】
                 *   real_name【真实姓名】
                 *   mobile【手机号带*号】
                 *   userlevel_id【会员级别】
                 *   id【会员ID】
                 *   tags【标签】
                 *   hobby【爱好】
                 *   address_code【地址编码】
                 *   address【地址】
                 *   invite_code【邀请码】 **/
                "userInfo": {
                    "invite_code": "",
                    "address": "",
                    "address_code": "",
                    "hobby": "",
                    "tags": "",
                    "id": "",
                    "userlevel_id": "",
                    "mobile": "",
                    "real_name": "",
                    "avatar": "",
                    "account": "",
                    "email": "",
                    "birthday": "",
                    "gender": "",
                    "create_time": "",
                    "user_money": "",
                    "freeze_money": "",
                    "total_consumption_money": "",
                    "score": "",
                    "_mobile": "",
                    "coupon": "",
                    "collection_count": "",
                    "browse_count": "",
                    "total_money": "",
                    "certified": "",
                    "nickname": "",
                    "is_pay_password": "",
                    "follow_count": "",
                    "is_close": "",
                },
				group:1,//1学生  2教师
            };
        },
        computed: {
            isLogin() {
                return uni.getStorageSync('USER_TOKEN_7863') == '' ? false : true;
            }
        },
        watch: {},
        onLoad(options) {

        },
        onUnload() {

        },
        onReady() {

        },
        onShow() {
			this.group=uni.getStorageSync('USER_GROUP')
            this.queryUserInfoFunc()
        },
        onHide() {

        },
        onResize() {

        },
        onPullDownRefresh() {

        },
        onReachBottom(e) {

        },
        onPageScroll(e) {

        },
        methods: {
            //查询用户详细信息
            async queryUserInfoFunc() {
                console.log(uni.getStorageSync('USER_INFO_7863'))
                console.log(111111)
                if (this.isLogin === true && this.group==2) {
                    //请求方法
                    //数据验证
					let url=host+'/api/v1/5c78c4772da97'
                    let datauserInfo = await this.$api.get(url, {
                        user_id: uni.getStorageSync('USER_INFO_7863').aid
                    });

                    if (datauserInfo.data.code != 1) {
                        this.$message.info(datauserInfo.data.msg);
                        return
                    }
                    let infouserInfo = datauserInfo.data;
                    this.userInfo = infouserInfo.data
					uni.setStorageSync('USER_XQ', this.userInfo.dept_id);
					 return
                }
               
                if (this.isLogin === true && this.group==1) {
                    //请求方法
                    //数据验证

                    let datauserInfo = await this.$api.get(global.apiUrls.post5c78c4772da97, {

                    });

                    if (datauserInfo.data.code != 1) {
                        this.$message.info(datauserInfo.data.msg);
                        return
                    }
                    let infouserInfo = datauserInfo.data;
                    this.userInfo = infouserInfo.data
					uni.setStorageSync('error_num',this.userInfo.error_num)
					uni.setStorageSync('USER_XQ', this.userInfo.dept_id);
                }
            },
			outFunc(){
				uni.setStorageSync('USER_TOKEN', '');
				uni.setStorageSync('USER_TOKEN_7863', '');
				uni.setStorageSync('USER_INFO_7863', '');
				uni.setStorageSync('USER_INFO', '');
				global.token=''
				uni.reLaunch({
					url:'/pagetabBar/loginPage/loginPage'
				})
				
			}
        }
    };
</script>
<style lang="scss" scoped>
    .page {
        width: 100vw;
        overflow-x: hidden;
        min-height: calc(100vh - var(--window-bottom));
        background: url(image-path('80.png')) no-repeat;
        background-size: 100% auto;
		.yltop{
			width: 100%;
			margin-bottom: 20rpx;
		}
		.yl{
			width: 686rpx;
			height: 180rpx;
			// border-radius: 0rpx;
			margin: 0 auto;
		}
        .my_flex_4_higd {
            width: 750rpx;
            height: 88rpx;
            overflow: hidden;
            z-index: 10;
            bottom: calc(88rpx + var(--window-bottom));

            .my_fd4_0_higd {
                border-radius: 44rpx;
                width: 622rpx;
                line-height: 88rpx;
                font-size: 32rpx;
                background: #D32A29;
                color: #fff;
                height: 88rpx;
            }
        }

        .my_flex_3_higd {
            padding: 0rpx 24rpx 24rpx 24rpx;

            .my_fd3_0_higd {
                background: #FFFFFF;
                padding: 0rpx 24rpx 0rpx 29rpx;
                border-radius: 16rpx 16rpx 0rpx 0rpx;
            }

            .my_fd3_4_higd {
                background: #FFFFFF;
                padding: 0rpx 24rpx 0rpx 29rpx;
                border-radius: 0rpx 0rpx 16rpx 16rpx;
            }
        }

        .my_fd3_0_c0_c0_higd {
            width: 36rpx;
            height: 36rpx;
            border-radius: 0rpx 0rpx 0rpx 0rpx;
        }

        .my_fd3_0_c1_higd {
            margin: 0rpx 0rpx 0rpx 20rpx;
            padding: 32rpx 0rpx 32rpx 0rpx;
            border-bottom: 1px solid #eee;
        }

        .my_fd3_0_c1_c0_higd {
            color: #333333;
            font-size: 28rpx;
            font-weight: 400;
        }

        .my_fd3_0_c1_c1_higd {
            width: 14rpx;
            height: 26rpx;
            border-radius: 0rpx 0rpx 0rpx 0rpx;
        }

        .my_fd3_1_higd {
            background: #FFFFFF;
            padding: 0rpx 24rpx 0rpx 29rpx;
        }

        .my_flex_2_higd {
            width: 702rpx;
            height: 258rpx;
            background: #FFFFFF;
            margin: 0rpx auto 30rpx auto;
            border-radius: 16rpx;
            padding: 32rpx 24rpx 32rpx 24rpx;

            .my_fd2_0_c0_higd {
                color: #393939;
                font-size: 32rpx;
                font-weight: 700;
                text-align: left;
                font-style: normal;
            }

            .my_fd2_1_higd {
                margin: 32rpx 0rpx 0rpx 0rpx;
                padding: 0rpx 80rpx 0rpx 80rpx;
            }
        }

        .my_fd2_1_c0_c0_higd {
            width: 60rpx;
            height: 60rpx;
            border-radius: 0rpx;
            margin: 0rpx 0rpx 16rpx 0rpx;
        }

        .my_fd2_1_c0_c1_higd {
            color: #333333;
            font-size: 24rpx;
            font-weight: 400;
            line-height: 36rpx;
            text-align: center;
            font-style: normal;
        }

        .my_fd1_0_higd {
            padding: 0rpx 32rpx 0rpx 32rpx;

            .my_fd1_0_c0_higd {
                padding: 64rpx 27rpx 36rpx 0rpx;

                .my_fd1_0_c0_c0_higd {
                    width: 100%;

                    .my_fd1_0_c0_c0_c1_c0_higd {
                        color: var(--benbenFontColor3);
                        font-size: 38rpx;
                        font-weight: 700;
                        margin: 0rpx 0rpx 17rpx 0rpx;
                    }

                    .my_fd1_0_c0_c0_c1_c1_higd {
                        color: #808594;
                        font-size: 28rpx;
                        font-weight: 400;
                    }

                    .my_fd1_0_c0_c0_c2_higd {
                        color: var(--benbenFontColor3);
                        font-size: 32rpx;
                        margin: 0rpx 20rpx 0rpx 0rpx;
                    }

                    .my_fd1_0_c0_c0_c3_higd {
                        width: 12rpx;
                        height: 22rpx;
                        border-radius: 0rpx 0rpx 0rpx 0rpx;
                    }
                }

                .my_fd1_0_c0_c1_c1_c0_higd {
                    color: var(--benbenFontColor3);
                    font-size: 48rpx;
                    font-weight: 700;
                    margin: 0rpx 0rpx 17rpx 0rpx;
                }
            }
        }

        .my_fd1_0_c0_c0_c0_higd {
            width: 132rpx;
            height: 132rpx;
            border-radius: 180rpx 180rpx 180rpx 180rpx;
            margin: 0rpx 38rpx 0rpx 0rpx;
        }

        .my_flex_0_higd {
            width: 750rpx;
            height: 88rpx;
            overflow: hidden;
            z-index: 10;
            top: 0rpx;

            .my_fd0_0_higd {
                padding: 0rpx 32rpx 0rpx 32rpx;

                .my_fd0_0_c1_c0_higd {
                    font-size: 36rpx;
                    font-weight: 700;
                    color: var(--benbenFontColor3);
                    line-height: 88rpx;
                }
            }
        }

        .my_fd0_0_c0_higd {
            width: 120rpx;

            .my_fd0_0_c0_c0_higd {
                font-size: 36rpx;
                color: #333;
            }
        }

        .my_fd0_0_c2_c0_higd {
            position: absolute;
            right: -20rpx;
            top: -20rpx;
            z-index: 1;
        }

        .my_fd0_0_c2_c1_higd {
            width: 44rpx;
            height: 44rpx;
            border-radius: 0rpx;
        }
    }
	.system_flex_2_ben {
		background: #fff;
		width: 540rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}
	.system_fd2_2_ben {
			margin: 37rpx 0rpx 0rpx 0rpx;
		}
	
		.system_fd2_1_ben {
			line-height: 44rpx;
			font-size: 32rpx;
			font-weight: 500;
			color: #333333;
		}
	
		.system_fd2_0_ben {
			font-size: 36rpx;
			font-weight: 800;
			line-height: 44rpx;
			color: #333333;
			margin: 40rpx 0rpx 40rpx 0rpx;
		}
		.system_fd2_2_c1_ben {
				border-top: 1px solid #eee;
				border-left: 1px solid #eee;
				background: #fff;
				line-height: 110rpx;
				border-radius: 0rpx 0rpx 16rpx 0rpx;
				font-size: 32rpx;
				color:#D32A29;
				width: 268rpx;
			}
		
			.system_fd2_2_c0_ben {
				border-top: 1px solid #eee;
				background: #fff;
				line-height: 110rpx;
				border-radius: 0rpx 0rpx 0rpx 16rpx;
				font-size: 32rpx;
				color: rgba(153, 153, 153, 1);
				padding: 0rpx 103rpx 0rpx 103rpx;
			}
		
			.system_fd2_2_ben {
				margin: 37rpx 0rpx 0rpx 0rpx;
			}
</style>